package com.dongdongshop.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dongdongshop.data.Result;
import com.dongdongshop.em.ConstantEnum;
import com.dongdongshop.pojo.TbContentCategory;
import com.dongdongshop.service.ContentService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@RequestMapping("contentController1")
@Controller
public class ContentController {

    @Reference
    private ContentService contentService;

    @RequestMapping("carousel")
    @ResponseBody
    public Result carousel(Long categoryId,Integer count){
      List<TbContentCategory> list = contentService.selectPic(categoryId,count);
      return Result.build(ConstantEnum.SUCCESS).setResult(list);
    }
}
